package com.xiaoran.robot.utils;

import net.coobird.thumbnailator.Thumbnails;

import java.io.IOException;

public class ImageUtils {
    public static void compressImg(String sourceFile, String destFile){
        try {
            Thumbnails.of(sourceFile).scale(1f).outputQuality(0.5f).toFile(destFile);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
